Tape drives can be used to store massive amounts of data to magnetic tapes. Magnetic tapes are often used for archival storage, and provide a reasonable cost vs. storage size tradeoff.
Unlike traditional hard disk drives, tapes are written to and read from sequentially. For writing data to a tape, the data can be streamed from a buffer to the tape as a tape spools. The drive may only write and read data while the tape is moving at a constant velocity. In order to attain high average data transfer rates, stopping and starting of tape motion must be kept to a minimum. Although data can be read from and written to a moving tape at high speeds, this stopping and starting of the tape reels can take seconds each time, and in a world where data is transferred at billions of bits per second, a few seconds per direction change can result in significant slowdown.
Additionally, as tape drive transfer rates increased, a problem was encountered wherein there would be, at times, insufficient data streaming to the tape to efficiently write the tape at maximum speed. Accordingly, the tape would have to be stopped backed up, and re-started. Fluctuations in the volume of data being written could cause this to occur repeatedly (speed up the drive for high volume data writing, stop, back up and repeat). This resulting back and forth is known as shoe shining or back-hitch.
To address this problem, larger buffers were added to tape drives. The buffer is typically comprised of volatile memory, and it stores large amounts of data to allow data to efficiently be streamed to a tape. The buffer can receive a reasonable amount of incoming data, and then, when there is sufficient data in the buffer, begin the write process. This prevents shoe shining, or at least reduces the incidences of it.
One example of buffer use is in an archiving process. If data is being streamed to a backup system from numerous sources, the volume of data coming in to be written may vary greatly over time. Further, the delivered volume of data at the delivery speed may exceed the maximum write rate to tape. Accordingly, this data can be stored in buffer until it is written to the drive.
In this type of system, it is not uncommon for the writing entity to receive a synchronization request from the delivering entity. The synchronization request is an instruction that all data presently in the buffer should be written to the tape. To respond positively to this request, i.e., to confirm the synchronization, the writing entity must be sure that all the data in the buffer is written to the tape. Since this process may take some time, however, the drive cannot always immediately confirm the synchronization request. Further, even if the drive intends to write all presently buffered data to the tape, it cannot confirm the request until the write is completed, in case of power failure or some other failure which would wipe the buffer clean.
One solution to this problem is found in IBM's Virtual Backhitch. In this solution, when a synchronization request is received, the drive selects an unused track on the tape presently being written to and then proceeds to rapidly transfer the buffer to tape, respond to the synchronization, and continue moving tape even though there is no new data to write yet. Since tape is still in motion, when more write data is received, it may be written immediately without having to wait for the tape to ramp up to speed making each synchronization response much quicker than if data were not being written in a sparse fashion. Once a sufficient amount of data has been written in a sparse fashion, the system can reposition to the point in the tape where the sparse data starts, and begin writing the data in an efficient compressed fashion, eventually overwriting the back-up version of the data as this process repeats. In the event of a power or other failure prior to the data being compacted in the normal fashion, all the data that was reported as synchronized is written to the tape and can be read back even though it isn't written in the typical fashion.
According to one illustrative embodiment, a method of backing up buffered data from a buffer includes receiving a synchronization request. The method further includes ensuring buffered data corresponding to the synchronization request is stored in one or more non-volatile memory circuits and responding affirmatively to the synchronization request. This non-volatile memory circuit(s) provides a copy of the data that will not be lost in the event of a power or other failure. This memory can include, but is not limited to, flash-backed RAM, EPROM flash memory, and battery-backed RAM.
In another illustrative embodiment, a data storage apparatus comprises a buffer to store data to be written to a tape, a tape drive, in communication with the buffer, to write data from the buffer to a tape, one or more non-volatile memory circuits to store data corresponding to a synchronization request, and a processor to instruct operation of the buffer, tape drive and non-volatile memory circuits. In this illustrative embodiment, upon receipt of the synchronization request, the processor is operable to instruct the buffer to determine if data corresponding the synchronization request is stored in non-volatile memory circuits.
In yet a further illustrative embodiment, a data backup system comprises a requesting device, including at least an outgoing stream of data. The system also includes a backup device. The backup device includes an incoming stream of data corresponding to the outgoing stream of data. The backup device also includes a buffer to store at least a portion of the incoming stream of data and a tape drive to write data stored in the buffer to a tape. Further, the backup device includes one or more non-volatile memory circuits to store back-up versions of data in the buffer.
In this exemplary system, upon detection of a synchronization request included with the incoming stream of data, the backup device is operable to copy data corresponding to the synchronization request from the buffer to the non-volatile memory circuit.